package com.smart.service;

import com.smart.domain.Express;
import com.smart.domain.User;
import com.smart.infer.expressPieceInt;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName expressPieceService
 * @Description 对揽件的操作
 * @Author wangqian
 * @Date 2019/3/31 21:26
 **/
@Service
public class expressPieceService {
    @Autowired
    private expressPieceInt ep;

    public void expressPiece(String e_number){
        ep.updateStatusByEnum(e_number);//更新揽件状态
        ep.updateScoreDownByEnum(e_number);//订单人积分减10
    }
    public void udateScoreUp(String userid){
        ep.updateScoreUpByEnum(userid);//揽件人积分加10
    }
    public void updateExpressPiece(String e_number,String e_singer,String e_singernum,String userid,String e_leadtime){
        ep.updateSingerByEnum(e_number,e_singer,e_singernum,userid,e_leadtime);//更新揽件人姓名电话
    }
    public User selectPhoneByUserid(String userid){
        return ep.selectPhoneByUserid(userid);//查询揽件人手机号,姓名
    }
    public Express selectExpressByEnum(String e_number){
        Express express=ep.selectExpressByEnum(e_number);//根据快递号查询快递信息
        return express;
    }
    /*public List selectExpressByAddress(String e_address,String e_esc){
        List listExpress=ep.selectExpressByAddress(e_address,e_esc);//根据收件人地址查询快递信息
        return listExpress;
    }*/

}
